Release 10.1A: OpenEdge Development:
Java Open Clients


Constructors

The ProDataRelationMetaData class has two constructors for:

Creating a data-relation from parent and child ProDataObjectMetaData

The following constructor creates a ProDataRelationMetaData object with the specified ProDataObjectMetaData objects:

Syntax
ProDataRelationMetaData(String name, ProDataObjectMetaData parent, 
                        ProDataObjectMetaData child) 

name

Specifies the name of the ProDataRelationMetaData object.

parent

Specifies the parent ProDataObject type.

child

Specifies the child ProDataObject type.

After creating a ProDataRelationMetaData object using this constructor, use the object’s setColumns() methods to set the key fields for the parent and child table relationships. For more information, see the "setColumns( )" section.

Creating a data-relation from selected parent and child key fields

The following constructor creates a ProDataRelationMetaData object from column properties selected as key fields in specified parent and child tables (ProDataObject collections):

Syntax
ProDataRelationMetaData(String name, int parentIx, int childIx, int numPairs, 
                        String pairsList, ) 

name

Specifies the name of the ProDataRelationMetaData object.

parentIx

Specifies a 0-based index to a parent ProDataObject collection that corresponds to an index into the array of table names returned by the ProDataGraphMetaData getTableNames( ) method.

childIx

Specifies a 0-based index to a child ProDataObject collection that corresponds to an index into the array of table names returned by the ProDataGraphMetaData getTableNames( ) method.

numPairs

Specifies the number of column property pairs (key field pairs) that represent this relationship.

pairsList

Specifies a String containing a comma-separated list of column property names. The list consists of numPairs column pairs, where the parent's column property name is followed by its matching child column property name. For example:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095